import http from './httpInstance'

// 监控点在离线趋势
export const getVideoPlayInfo = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/resource/getVideoPlayInfo',
    data
  })
}

// 获取监控点列表
export const queryAllCamera = (params) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/resource/queryAllCamera',
    params
  })
}

// 设备状态接口
export const deviceOnline = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/barracks/deviceOnline',
    data
  })
}

// 门禁记录，默认返回10条数据
export const acsRecordList = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/barracks/acsRecordList',
    data
  })
}

// 告警列表，默认返回10条数据
export const alarmList = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/barracks/alarmList',
    data
  })
}

// 字典查询
export const dictByType = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/barracks/dictByType',
    data
  })
}

// 布撤防记录（视觉稿的通行记录）
export const defenseList = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/barracks/defenseList',
    data
  })
}

// 仓库信息，预计15条柱状图
export const houseInfo = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/barracks/houseInfo',
    data
  })
}

// 钥匙柜借取记录，分页数据
export const keyUseRecordList = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/barracks/keyUseRecordList',
    data
  })
}

// 温湿度对比图，预计15条柱状图
export const tempAndHumInfo = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/barracks/tempAndHumInfo',
    data
  })
}

// 监控点信息
export const cameraInfo = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/armory/cameraInfo',
    data
  })
}

// 军火库巡查记录
export const guardTourHistory = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/armory/guardTourHistory',
    data
  })
}

// 军火库通行比对记录
export const snapRecord = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/armory/snapRecord',
    data
  })
}

// 获取地图基础信息
export const baseInfo = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/armory/baseInfo',
    data
  })
}

// 获取 h5 监控点轮播时间(单位:秒)
export const getPreviewVideoUrl = (params) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/resource/getPreviewVideoUrl',
    params
  })
}
// 获取监控点轮播时间(单位:秒)
export const queryVideoLoopPeriod = (params) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/resource/queryVideoLoopPeriod',
    params
  })
}
// 获取接口轮询时间(单位:秒)
export const queryInterfaceLoopPeriod = (params) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/resource/queryInterfaceLoopPeriod',
    params
  })
}

// 陌生人识别记录
export const strangerRecordService = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/barracks/strangerRecord',
    data
  })
}

// 获取军火库列表
export const queryArsenalService = (data) => {
  return http({
    method: 'post',
    url: '/csjzzav/ui/v1/resource/queryArsenal',
    data
  })
}

export default {
  queryArsenalService,
  strangerRecordService,
  queryInterfaceLoopPeriod,
  queryVideoLoopPeriod,
  getPreviewVideoUrl,
  baseInfo,
  guardTourHistory,
  cameraInfo,
  deviceOnline,
  getVideoPlayInfo,
  queryAllCamera,
  acsRecordList,
  alarmList,
  dictByType,
  defenseList,
  houseInfo,
  keyUseRecordList,
  tempAndHumInfo
}
